package demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2024-05-24
 * Time: 19:35
 */
public class Cylinder {
    Circle bottom;
    double height;

    public Cylinder(Circle bottom, double height) {
        this.bottom = bottom;
        this.height = height;
    }

    public Circle getBottom() {
        return bottom;
    }

    public void setBottom(Circle bottom) {
        this.bottom = bottom;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
    public double getVolume(Circle bottom, double height){
        return bottom.getArea(bottom.radius)*height;
    }
}

